Bitcore-cli XRP updates#4184
Open
kajoseph wants to merge 20 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds missing XRP functionality across the stack (BWS → BWC → bitcore-cli) to (1) manage XRP AccountSet flags and (2) allow sending XRP with an optional destination tag, plus related CLI UX/help updates and dependency bumps.
Changes:
- Adds XRP account-flag support: BWS
/v1/flagsendpoint + BWC client method + CLI “Flags” advanced menu/command that can create an AccountSet tx. - Adds XRP destination-tag prompting/CLI option support in the transaction flow.
- Updates XRP tx-building to support AccountSet via
txTypeand comma-delimited flag parsing; bumps@clack/promptsand adds Node engine constraint for bitcore-cli.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/crypto-wallet-core/src/utils/index.ts | Adds normalizeXrpFlag() helper for XRP flag normalization/validation. |
| packages/crypto-wallet-core/src/transactions/xrp/index.ts | Adds txType support (incl. AccountSet) and string flag parsing for XRP transactions. |
| packages/bitcore-wallet-service/src/lib/server.ts | Passes flags into tx proposal creation; adds getFlags() service method. |
| packages/bitcore-wallet-service/src/lib/routes/wallets.ts | Adds authenticated GET /v1/flags route. |
| packages/bitcore-wallet-service/src/lib/model/txproposal.ts | Persists flags on tx proposals. |
| packages/bitcore-wallet-service/src/lib/common/utils.ts | Minor typing/doc fix for strip(). |
| packages/bitcore-wallet-service/src/lib/blockchainexplorers/v8.ts | Adds V8 explorer getFlags() and response-error scrubbing helper. |
| packages/bitcore-wallet-client/src/lib/api.ts | Normalizes outgoing XRP flags; adds getAccountFlags() client method and tx option typings. |
| packages/bitcore-cli/types/wallet.d.ts | Extends wallet typing with XRP getAccountFlags(). |
| packages/bitcore-cli/src/wallet.ts | Implements getAccountFlags() in CLI wallet wrapper. |
| packages/bitcore-cli/src/prompts.ts | Adds promptXrpFlag() multiselect prompt for flag toggling. |
| packages/bitcore-cli/src/commands/transaction.ts | Adds CLI support for --flags and destination --tag, plus XRP tag prompt in interactive flow. |
| packages/bitcore-cli/src/commands/index.ts | Exports new flags command. |
| packages/bitcore-cli/src/commands/flags.ts | New CLI command to view/toggle XRP flags and create AccountSet tx proposals. |
| packages/bitcore-cli/src/cli.ts | Wires flags into the command dispatcher. |
| packages/bitcore-cli/src/cli-commands.ts | Adds “Flags” option to Advanced menu for XRP wallets. |
| packages/bitcore-cli/package.json | Adds Node engine constraint; bumps @clack/prompts. |
| packages/bitcore-cli/package-lock.json | Lockfile updates for the dependency bump and bin name. |
Files not reviewed (1)
- packages/bitcore-cli/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Bitcore-CLI is missing some important XRP functionality - namely, sending with a destination tag and setting account flags.
Changelog
Testing Notes
Flagsadvanced option for XRP wallets onlyFlagsshould show you current account flagsFlagsshould allow you to choose account flags to setFlagsshould flow cleanly into the tx creation flow (with account and amount pre set).flagscommand should also show transaction options (e.g.bin/wallet <name> --command flags --help)Sendshould prompt you for an optional destination tag for XRP wallets onlyChecklist